﻿using System;
using System.Windows.Data;
using System.Globalization;

namespace Coco.Converters
{
    public class CultureNameToNativaNameConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return new CultureInfo(value as string).NativeName;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}
